/**
 * 
 */
package pa2;

import java.io.Serializable;

/**
 * @author Joerg Poecher
 *
 */
public class MyKVMessage implements Serializable {

	private static final long serialVersionUID = 1L;
	
	private long key;
	private String value;
	private int hopCount;
	private long[] range;
	
	// constructor
	public MyKVMessage(long key, String value) {
		setValue(value);
		setKey(key);
		setHopCount(0);
		setRange( new long[] {0, IMyKVPeer.MAX_KEY_VALUE + 1} );
	}
	
	
	// Getters and Setters
	
	public long getKey() {
		return key;
	}

	private void setKey(long key) {
		this.key = key;
	}

	public String getValue() {
		return value;
	}

	private void setValue(String value) {
		this.value = value;
	}

	public int getHopCount() {
		return hopCount;
	}

	private void setHopCount(int hopCount) {
		this.hopCount = hopCount;
	}
	
	public void incHopCount() {
		this.hopCount++;
	}

	public long[] getRange() {
		return range;
	}

	public void setRange(long[] range) {
		this.range = range;
	}

	

}
